package com.dxq.test.adapter;

import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.dxq.test.R;
import com.dxq.test.db.Event;
import com.dxq.test.db.Group;
import com.dxq.test.db.Label;

import java.util.List;

/**
 * Author: zsh
 * Date: 2023/11/08
 * Describe: 群列表adapter
 */
public class GroupAdapter extends BaseQuickAdapter<Group, BaseViewHolder> {

    public GroupAdapter(int layoutResId) {
        this(layoutResId, null);
    }

    public GroupAdapter(int layoutResId, @Nullable List<Group> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder holder, Group item) {
        //holder.setText(R.id.tvSize, String.valueOf(1 + holder.getLayoutPosition()));
        holder.setText(R.id.tvName, item.getName() + "(" + item.getLabelSize() + ")");
    }
}
